home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19970104-19970326
/
000296_news@columbia.edu _Fri Feb 21 13:18:26 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Return-Path: <news@columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id NAA18927
for <kermit.misc@watsun.cc.columbia.edu>; Fri, 21 Feb 1997 13:18:15 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id NAA04437
for kermit.misc@watsun; Fri, 21 Feb 1997 13:18:15 -0500 (EST)
Path: news.columbia.edu!panix!news.eecs.umich.edu!news.mathworks.com!howland.erols.net!vixen.cso.uiuc.edu!sdd.hp.com!hpscit.sc.hp.com!hpuerci.atl.hp.com!news
From: John Bigg <jbigg@uksr.hp.com>
Newsgroups: comp.protocols.kermit.misc
Subject: Problems with macro parameters containing spaces.
Date: Fri, 21 Feb 1997 18:02:41 +0000
Organization: Hewlett-Packard Co.
Lines: 51
Distribution: world
Message-ID: <330DE341.6927@uksr.hp.com>
NNTP-Posting-Host: hppine38.uksr.hp.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01 (X11; I; HP-UX A.09.05 9000/715)
CC: jbigg@uksr.hp.com
Xref: news.columbia.edu comp.protocols.kermit.misc:6635
I have been having problems with parameters to kermit macros for some
time now. It has been really driving me mad. Maybe the answer is in the
kermit book which I now have on order.
Anyway, this is the problem.
It appears that if I'm passing parameters to a macro and the parameters
contain spaces \%1 only contains the first word. e.g.
C-Kermit>def mymacro { return \%1 }
C-Kermit>asg \%a {This is some text}
C-Kermit>echo \fexec(mymacro,\%a)
This
I thought I could work around this by using {{ }} around the parameter.
C-Kermit>echo \fexec(mymacro,{{\%a}})
This is some text
which is fine. But if the text contains a } then this doesn't work
either.
C-Kermit>asg \%a {This is \125 some text}
C-Kermit>echo \fexec(mymacro,{{\%a}})
This is
The only solution seems to be to abandon parameters and use global
variables instead but this seems really awkward.
C-Kermit>def mymacro { return \%p }
C-Kermit>asg \%p \%a
C-Kermit>echo \fexec(mymacro)
This is } some text
Has anyone got a better solution to this?
By the way, \fchecksum and \fhexify are great additions to kermit 6,
they have simplified my implementation of TAP and UCP protocols
immensely.
Thanks
John
--
______________________________________________________________________
John D. Bigg Email: jbigg@uksr.hp.com
HP-UX WTEC Engineer Desk: John Bigg/HP8005/S1
Hewlett Packard Ltd HP URL: http://hppine38.uksr.hp.com/
Nine Mile Ride, Wokingham Telephone: +44 (0)1344 763038
Berkshire, RG40 3LL Voicemail: +44 (0)1344 367518
United Kingdom Telnet: 315-3038